﻿
@model IEnumerable<ETL.Business.Models.ProjectTaskModel>
@{
    var gridTask = new WebGrid(
        Model,
        defaultSort: "Name",
        fieldNamePrefix: "gridTask_",
        canSort : false,
        canPage : false
        );
}

<script src="../../Scripts/managetask-events.js" type="text/javascript"></script>

<div id="ajaxGridTask" >
    <div class="well">
    @if (Model != null && Model.Count() > 0)
    {
        @gridTask.GetHtml(
            tableStyle: "table table-hover",
            //headerStyle: "webgrid-header",
            //footerStyle: "webgrid-footer",
            //alternatingRowStyle: "webgrid-alternating-row",
            //selectedRowStyle: "webgrid-selected-row",
            //rowStyle: "webgrid-row-style",
            columns: gridTask.Columns(
                gridTask.Column("Task Id", null, @<text>@item.TaskId</text>),
                gridTask.Column("Task", "Task", @<text>@item.TaskName</text>),
                gridTask.Column("Project", "Project", @<text>@item.ProjectName</text>),
                gridTask.Column("Project ID", "ProjectId", @<text>@item.ProjectId</text>),
                gridTask.Column("Total Time", "TotalTime", @<text>@item.TotalTime</text>),
                gridTask.Column("Percent Complete", "%Complete", @<text>@item.PercentComplete</text>)
                )
            )
    }
    </div>
</div>
